<template>
      <div class="box_">
           <div class="content">
               <h3>详情</h3>
               <p>{{info}}</p>
               <button @click="down">关闭</button>
           </div>
      </div>
</template>

<script>
export default {
    name: "DetailsWindow",
    props:['info'],
    methods:{
        down(){
            this.$emit("down");
        }

    }
}
</script>

<style scoped>
.box_{
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(54, 53, 53, 0.1);
    margin: auto;
    z-index: 9999;
}

.content{
    position: relative;
    width: 400px;
    height: 250px;
    padding: 0 10px;
    background: white;
    border-radius: 2px;
    box-shadow: 0 0 15px -1px #d5d5d5;
    animation: box_p 0.4s ease-in-out 0s 1 forwards;
}
@keyframes box_p {
    0%{
        transform: scale(0);
    }
    60%{
        transform: scale(1.2);
    }
    100%{
        transform: scale(1);
    }
}
h3{
    padding: 5px 0;
    text-align: center;
}
p{
    text-indent: 1rem;
    word-break: break-all;
    height: 160px;
    background: #b1b4b4;
    overflow: auto;
    padding: 10px 10px;
    color: white;
    letter-spacing: 1px;
}
/* 一般浏览器的不要太小，容易看不见 */
p::-webkit-scrollbar {
    width: 5px;
}
p::-webkit-scrollbar-thumb {
    border-radius: 1px;
    background: #f1c3d5;
}
p::-webkit-scrollbar-track {
    border-radius: 0;
    background: #f9f9fc;
}
button{
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translate(-50%);
    background: #3586f1;
    color: white;
    transition: all .3s;
    outline: none;
    border: 0;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 3px;
}
button:hover{
    opacity: .8;
}
</style>